﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataAccessLayer;

namespace BusinessLogicLayer
{
    public class SupplierBizlogic
    {
        SupplierDataAccess sr = new SupplierDataAccess();
        public List<string> getDepId()
        {
            List<string> idlist = new List<string>();
            idlist = sr.getSupplierid();
            return idlist;

        }
        public bool savesupplier(String SupplierID, String Suppliername, String ContactName, String Phoneno, String Faxno, String GSTregno, String address, String email)
        {
            bool ans = false;
            ans = sr.savesupplier(SupplierID, Suppliername, ContactName, Phoneno, Faxno, GSTregno, address, email);

            return ans;
        }

        public List<object> ret_sta_items_all()
        {
            List<object> rst = new List<object>();
            rst = sr.category_searchall();
            return rst;
        }
        public List<object> ret_sta_items(string search)
        {
            List<object> list_items = new List<object>();
            list_items = sr.category_search(search);
            return list_items;
        }

        public List<object> getcategories()
        {
            List<object> categories = new List<object>();
            categories = sr.getcategory();
            return categories;

        }
        public List<object> getCatItems(int category)
        {
            List<object> catItems = new List<object>();
            catItems = sr.getCatItems(category);


            return catItems;
        }
        public List<Object> getsuppliers()
        {
            List<Object> supplist=new List<object>();
            supplist = sr.getSuppliers();
            return supplist;
 
        }
    }
}
